package singleton;

import java.util.Hashtable;
import java.util.Vector;

public class Triple {
	private int no;
	private static Triple triple1 = new Triple(1);
	private static Triple triple2 = new Triple(2);
	private static Triple triple3 = new Triple(3);
	private static Hashtable hashtable = new Hashtable();
	
	static {
		hashtable.put(triple1.no, triple1);
		hashtable.put(triple2.no, triple2);
		hashtable.put(triple3.no, triple3);
	}
	private Triple(int no) {
		this.no = no;
	}
	public static Triple getInstance(int no) {
		System.out.println(hashtable);
		return (Triple) hashtable.get(no);
	}
}
